/* === Popup === */
@import url('./popup-vars.less');

.popup-backdrop {
  z-index: 10500;
}
.popup {
  position: absolute;
  left: 0;
  top: 0px;
  width: 100%;
  height: 100%;
  display: none;
  box-sizing: border-box;
  transition-property: transform;
  transform: translate3d(0, 100%, 0);
  background: #fff;
  z-index: 11000;
  overflow: hidden;
  border-radius: var(--f7-popup-border-radius);
  &.modal-in, &.modal-out {
    transition-duration: var(--f7-popup-transition-duration);
  }
  &.not-animated {
    transition-duration: 0ms;
  }
  &.modal-in {
    display: block;
    transform: translate3d(0, 0, 0);
  }
  &.modal-out {
    transform: translate3d(0, 100%, 0);
  }
}
.popup.swipe-close-to-top {
  &.modal-out {
    transform: translate3d(0, -100%, 0);
  }
}
@media (min-width: 630px) and (min-height: 630px) {
  .popup:not(.popup-tablet-fullscreen) {
    --f7-safe-area-top: 0px;
    width: var(--f7-popup-tablet-width);
    height: var(--f7-popup-tablet-height);
    left: 50%;
    top: 50%;
    margin-left: calc(-1 * var(--f7-popup-tablet-width) / 2);
    margin-top: calc(-1 * var(--f7-popup-tablet-height) / 2);
    transform: translate3d(0, 100vh, 0);
    box-shadow: var(--f7-popup-box-shadow);
    border-radius: var(--f7-popup-tablet-border-radius, var(--f7-popup-border-radius));
    &.modal-in {
      transform: translate3d(0, 0, 0);
    }
    &.modal-out {
      transform: translate3d(0, 100vh, 0);
    }
    &.swipe-close-to-top.modal-out {
      transform: translate3d(0, -100vh, 0);
    }
  }
}
html.with-modal-popup {
  .framework7-root {
    > .views, > .view, > .panel {
      .page-content {
        .not-scrollable();
      }
    }
  }
}

html.with-modal-popup-push,
html.with-modal-popup-push-closing {
  .popup-push {
    top: calc(var(--f7-popup-push-offset) + 10px);
    height: calc(100% - var(--f7-popup-push-offset) - 10px);
    border-radius: var(--f7-popup-push-border-radius) var(--f7-popup-push-border-radius) 0 0;
    .view, .page {
      --f7-safe-area-top: 0px;
    }
  }
  .framework7-root {
    background: #000;
    > .views,
    > .view {
      transition-duration: var(--f7-popup-transition-duration);
    }
  }
}
html.with-modal-popup-push {
  .framework7-root {
    > .views,
    > .view {
      border-radius: var(--f7-popup-push-border-radius) var(--f7-popup-push-border-radius) 0 0;
      transform: translate3d(0, 0, 0px) scale(var(--f7-popup-push-scale, 1));
    }
  }
}

.if-ios-theme({
  @import url('./popup-ios.less');
});
.if-md-theme({
  @import url('./popup-md.less');
});
.if-aurora-theme({
  @import url('./popup-aurora.less');
});
